//
//  DestinationCollectionViewCell.m
//  LNA
//
//  Created by dllo on 16/1/20.
//  Copyright © 2016年 www.lanou3g.com蓝鸥. All rights reserved.
//

#import "DestinationCollectionViewCell.h"

@implementation DestinationCollectionViewCell

- (void)dealloc
{
    [_imgView release];
    [_countLabel release];
    [_ennameLabel release];
    [_labelLabel release];
    [_cnnameLabel release];
    
    [super dealloc];
    
    
}
//初始化
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.imgView = [[UIImageView alloc] init];
//        _imgView.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_imgView];
        
        self.view = [[UIView alloc] init];
        _view.backgroundColor =  [UIColor colorWithRed:85 / 255.0 green:85 / 255.0 blue:85 / 255.0 alpha:1];
        [_imgView addSubview:_view];
        
        self.cnnameLabel = [[UILabel alloc] init];
//        _cnnameLabel.backgroundColor = [UIColor greenColor];
        [_imgView addSubview:_cnnameLabel];
        
        self.ennameLabel = [[UILabel alloc] init];
//        _ennameLabel.backgroundColor = [UIColor greenColor];
        [_imgView addSubview:_ennameLabel];
        
        self.labelLabel = [[UILabel alloc] init];
//        _labelLabel.backgroundColor = [UIColor yellowColor];
        [_view addSubview:_labelLabel];
        
        self.countLabel  = [[UILabel alloc] init];
//        _countLabel.backgroundColor = [UIColor yellowColor];
        [_view addSubview:_countLabel];
        
       
    }
    return self;
    
    
}
#pragma mark - 布局方法
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    _imgView.frame = CGRectMake(0, 0, layoutAttributes.size.width, layoutAttributes.size.height);
    _view.frame = CGRectMake(100, 15, 60, 60);
    _countLabel.frame = CGRectMake(15, 5, 40, 30);
    _labelLabel.frame = CGRectMake(15, 30, 50, 25);
    _cnnameLabel.frame = CGRectMake(15, 200, 100, 30);
    _ennameLabel.frame = CGRectMake(13, 230, 100, 30);
}
@end
